package com.example.feignapi.service;

import com.example.req.LoginUserReq;
import com.example.req.LoginUserSaveReq;
import com.example.resp.CommonResp;
import com.example.resp.LoginUserResp;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;


@FeignClient(name = "provider",path = "/login-user")
public interface UserClient {

    @PostMapping("register")
    CommonResp register(@Valid @RequestBody LoginUserSaveReq req);

    @PostMapping("login")
    LoginUserResp login(@Valid @RequestBody LoginUserReq req);
}
